package com.validator;


import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author zdh
 */
public class NotEmptyConstraintValidator implements ConstraintValidator<NotEmptyCheck, String> {

    @Override
    public void initialize(NotEmptyCheck notEmptyCheck) {
    }

    @Override
    public boolean isValid(String str, ConstraintValidatorContext context) {
        return !(str==null || str.isEmpty());
    }
}

